<!DOCTYPE html>
<html>
<head>
    <title>图文宝商品分类表</title>
    <#include "/header.html">
</head>
<style>
    .el-table td, .el-table th {
        padding: 5px 0;
    }
    .el-table th {
        color: #0a8ddf;
    }
</style>
<body>
<div id="rrapp">
    <!--搜索-->
    <div>
        <el-form :inline="true" class="demo-form-inline" size="small">
            <el-form-item>
                <el-input v-model="q.categoryName" placeholder="分类名称"></el-input>
            </el-form-item >
            <el-form-item>
                <el-select v-model="q.categoryType" placeholder="门店类型" style="width: 150px;">
                    <el-option label="全 部" value=""></el-option>
                    <el-option label="数码图文店" value="fastStore"></el-option>
                    <el-option label="广告物料店" value="materialStore"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-date-picker v-model="q.beginTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
                                default-time="00:00:00" placeholder="创建日期"></el-date-picker>
            </el-form-item>
            <el-form-item>
                <el-date-picker v-model="q.endTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
                                default-time="23:59:59" placeholder="创建日期"></el-date-picker>
            </el-form-item>
            <el-button type="primary" @click="search" icon="el-icon-search" size="small" plain>查询</el-button>
            <el-button type="primary" @click="reset" size="small" plain>重置</el-button>&nbsp;&nbsp;&nbsp;
            <el-button size="small" type="success" @click="handleAdd">新 增</el-button>&nbsp;&nbsp;&nbsp;
            <el-button size="small" type="danger" icon="el-icon-delete" @click="handleAllDelete">多选删除</el-button>

        </el-form>
    </div>
    <!--首页-->
    <template>
        <el-table border :data="storeGoodsCategoryTwd" ref="multipleTable" style="width: 100%">
            <el-table-column type="index" label="序号" :index="indexMethod" width="60px;"
                             align="center"></el-table-column>
            <el-table-column type="selection" width="40" align="center"></el-table-column>
            <el-table-column prop="categoryName" label="分类名称" align="center"></el-table-column>
            <el-table-column prop="categoryType" label="门店类型"
                             :formatter="typeFormatter" align="center"></el-table-column>
            <el-table-column prop="categoryOrder" label="分类排序" align="center"></el-table-column>
            <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
            <el-table-column prop="createName" label="创建人" align="center"></el-table-column>
            <el-table-column label="操作" align="center">
                <template slot-scope="scope">
                    <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
                    <el-button size="mini" type="danger" icon="el-icon-delete" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
                </template>
            </el-table-column>
        </el-table>
        <br>
        <div class="block" align="center">
            <el-pagination
                    @size-change="handleSizeChange"
                    @current-change="handleCurrentChange"
                    :current-page="page.currentPage"
                    :page-sizes="page.pageSizes"
                    :page-size="page.pageSize"
                    layout="total, sizes, prev, pager, next, jumper"
                    :total="page.total">
            </el-pagination>
        </div>
    </template>

    <!-- 新增/编辑 -->
    <el-dialog :title="title" :visible.sync="dialogFormVisible" width="480px" :before-close="closeChangeMachie">
        <el-form :model="categoryFrom" ref="categoryFrom" label-width="100px" center>
            <el-form-item v-show="categoryFrom.categoryId ==null" label="门店类型" prop="categoryType"
                          :rules="[ { required: true, message: '内容不能为空'}]">
                <el-select v-model="categoryFrom.categoryType" placeholder="门店类型" style="width: 340px;">
                    <el-option label="数码图文店" value="fastStore"></el-option>
                    <el-option label="广告物料店" value="materialStore"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item v-show="categoryFrom.categoryId !=null" label="门店类型">
                <el-select v-model="categoryFrom.categoryType" placeholder="门店类型" disabled="true" style="width: 340px;">
                    <el-option label="数码图文店" value="fastStore"></el-option>
                    <el-option label="广告物料店" value="materialStore"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item v-show="categoryFrom.categoryId==null" label="分类名称" prop="categoryName"
                          :rules="[ { required: true, message: '不能为空'}]">
                <el-input v-model.trim="categoryFrom.categoryName" type="text" placeholder="请输入分类名称"
                          clearable></el-input>
            </el-form-item>
            <el-form-item v-show="categoryFrom.categoryId !=null" label="分类名称">
                <el-input v-model.trim="categoryFrom.categoryName" type="text" disabled="true"></el-input>
            </el-form-item>
            <el-form-item label="分类排序" prop="categoryOrder"
                          :rules="[ { required: true, message: '分类排序数字大于 0'}]">
                <el-input v-model.number="categoryFrom.categoryOrder" placeholder="请输入大于0数字"
                          clearable></el-input>
            </el-form-item>

            <el-form-item center>
                <el-button type="primary" id="click1" @click="submitForm('categoryFrom')" onclick="testButton()">提交
                </el-button>&nbsp;&nbsp;&nbsp;&nbsp;
                <el-button v-show="categoryFrom.categoryId !=null" @click="closeChangeMachie">取消</el-button>
                <el-button v-show="categoryFrom.categoryId==null" @click="resetForm('categoryFrom')">重置</el-button>
            </el-form-item>
        </el-form>
    </el-dialog>


</div>
<script src="${request.contextPath}/statics/js/modules/store/storeGoodsCategory/storegoodscategorytwd.js?_${.now?long}"></script>
</body>
</html>